package Javatest2.iftest;

import java.util.Scanner;

public class test5 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入你的年级");
        int r = scanner.nextInt();
        switch (r){
            case 1:{
                System.out.println("你是一年级");break;
            }
            case 2:{
                System.out.println("你是二年级");break;
            }
            case 3:{
                System.out.println("你是三年级");break;
            }
            case 4:{
                System.out.println("你是四年级");break;
            }
        }
        if (r == 1){
                System.out.println("你是一年级");
        }
        if (r == 2){
            System.out.println("你是二年级");
        }
        if (r == 3){
            System.out.println("你是三年级");
        }
        if (r == 4){
            System.out.println("你是四年级");
        }
    }
}
